package book;

public class BookList {
    private Book[] bookList;
    private int usedSize;

    public BookList() {
        this.bookList = new Book[10];
        bookList[0] = new Book("三国演义", "罗贯中", 59.9, "小说");
        bookList[1] = new Book("红楼梦", "曹雪芹", 79.9, "小说");
        bookList[2] = new Book("西游记", "吴承恩", 49.9, "小说");
        this.usedSize = 3;
    }
    public Book getBook(int pos){
        return bookList[pos];
    }
    public void setBook(int pos, Book book){
        bookList[pos] = book;
    }
    public int getUsedSize(){
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
}
